Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ErrorGuaranteed more in MIR type ops #111918

Merged
merged 2 commits into from
May 26, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 24, 2023

Delay bugs more eagerly and pass them through type op infra instead of delaying them at all the usage-sites.

Follow up to: #111741 (comment)

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 24, 2023
@compiler-errors compiler-errors marked this pull request as ready for review May 25, 2023 03:25
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me after comments

compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated Show resolved Hide resolved
compiler/rustc_borrowck/src/type_check/mod.rs Show resolved Hide resolved
@rustbot
Copy link
Collaborator

rustbot commented May 25, 2023

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr, @compiler-errors

@compiler-errors
Copy link
Member Author

Removed fallible, addressed nit

@bors r=lcnr

@bors
Copy link
Contributor

bors commented May 25, 2023

📌 Commit 0a35db5 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 26, 2023
…r, r=lcnr

Use `ErrorGuaranteed` more in MIR type ops

Delay bugs more eagerly and pass them through type op infra instead of delaying them at all the usage-sites.

Follow up to: rust-lang#111741 (comment)

r? `@lcnr`
@bors
Copy link
Contributor

bors commented May 26, 2023

⌛ Testing commit 0a35db5 with merge be72f25...

Comment on lines +89 to +94
(
Self::QueryResponse,
Option<Canonical<'tcx, ParamEnvAnd<'tcx, Self>>>,
PredicateObligations<'tcx>,
Certainty,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sure is a type xx, we should define a separate struct for that

@bors
Copy link
Contributor

bors commented May 26, 2023

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing be72f25 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 26, 2023
@bors bors merged commit be72f25 into rust-lang:master May 26, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (be72f25): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
7.1% [6.7%, 7.8%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 644.366s -> 643.81s (-0.09%)

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 27, 2023
…=lcnr

Perform MIR type ops locally in new solver

The new solver already does caching, and it's generally more correct to be using the infcx of the MIR typeck (which has the defining anchor set correctly and has already initialized all the opaques from HIR typeck).

This is based on rust-lang#111918 so look at the final 3 commits.

This actually causes some tests to go from passing to failing, and failing to passing. Here's the full diff: https://www.diffchecker.com/hB4bh1A9/

Putting this up for exposure mostly.

r? `@lcnr`
@compiler-errors compiler-errors deleted the custom-type-ops-err branch August 11, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants